package TOYS.AUTOWELDING;


import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.net.InetAddress;
import java.net.UnknownHostException;

import javax.swing.JFrame;
import javax.swing.WindowConstants;

import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;

import TOOLS.SQLtool;

public class test002_CRC {

	public static void main(String[] args) throws Exception {
//		byte[] bytes= {0x01, 0x03, 0x02, (byte) 0xAD, 0x00, 0x02};
		String idata="01 03 02 AD 00 02";
		idata=idata.replace(" ", "");
		byte [] bytes=Hex.decodeHex(idata);
		String result=c_autoWelding.getCRC(bytes);
		System.out.println(result);
	}

}
